﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyHome.Configuration.ViewModel
{
    class MainViewModel : ViewModelBase.ViewModel
    {
        private PluginHostViewModel pluginHost;

        public PluginHostViewModel PluginHost
        {
            get
            {
                return pluginHost;
            }
            set
            {
                if (PluginHost != value)
                {
                    pluginHost = value;
                    OnPropertyChanged("PluginHost");
                }
            }
        }

        protected override void Initialize()
        {
            var service = new MyHome.Configuration.Net.ServiceClient();
            service.Open();
            PluginHost = new PluginHostViewModel(service);
            base.Initialize();
        }
    }
}
